package cn.com.w.bootlog.timer;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.Scheduled;

@Configuration
public class OutLogTimer {


    Logger logger = LoggerFactory.getLogger(OutLogTimer.class);

    /**
     * 上报数据的定时任务
     */
    @Async
    @Scheduled(cron = "0/5 * * * * ?")
    public void reportDataTasks() {
        logger.info("OutLogTimer-定时任务");
        logger.debug("OutLogTimer-定时任务");
        logger.warn("OutLogTimer-定时任务");
        logger.error("OutLogTimer-定时任务");

    }

}
